package com.ce.server.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ce.server.pojo.Checkin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author 郑爽
 * @since 2021-11-17
 */
public interface CheckinMapper extends BaseMapper<Checkin> {

  /**
   * 手动录入 , 即将 jkm_status 设置为 Y
   *
   * @param ids
   * @return
   */
  int updateCheckInByIds(Integer[] ids);

  int insertByEntity(Checkin checkin);


  /**
   * 分页获取所有数据
   *
   * @param page
   * @param checkin
   * @param beginDateScope
   * @return
   */
  IPage<Checkin> getAllRecords(@Param("page") Page<Checkin> page, @Param("checkin") Checkin checkin, @Param("beginDateScope") LocalDate[] beginDateScope);


}
